﻿using GC_FFW.ForecastWriterClient.Abstractions.Interfaces.Factories.ViewModel;
using GC_FFW.ForecastWriterClient.ViewModels;
using GC_FFW.ForecastWriterClient.ViewModels.Parameters;
using GC_FFW.SoccerfameParser.Abstractions.Interfaces.Factories;

namespace GC_FFW.ForecastWriterClient.Factories.ViewModel
{
	public class MatchEventsEditorViewModelFactory : IMatchEventsEditorViewModelFactory
	{
		#region Variables

		private readonly ISoccerfameDataHelperFactory _soccerfameDataHelperFactory;

		#endregion

		#region Constructors

		public MatchEventsEditorViewModelFactory(ISoccerfameDataHelperFactory soccerfameDataHelperFactory)
		{
			_soccerfameDataHelperFactory = soccerfameDataHelperFactory;
		}

		#endregion

		#region IMatchEventsEditorViewModelFactory Members

		public MatchEventsEditorViewModel Create(MatchEventsEditorViewModelParameters parameters)
		{
			if (parameters != null)
			{
				parameters.SoccerfameDataHelperFactory = _soccerfameDataHelperFactory;
			}

			return new MatchEventsEditorViewModel(parameters);
		}

		#endregion
	}
}
